/******************************************************************************************
* Project: Workhorses of Opportunity — Howard and Weinstein
*
* Purpose: Diagnostic checks of geographic and institutional coverage by normal school exposure
*
* Inputs:
*   - "tfs_cleaned.dta"
*
* Outputs:
*   - None (interactive inspection via `codebook` and `summarize`)
******************************************************************************************/

* Load selected variables for inspection
use acerecode unitid home_hasnormalschool homestate year homectyfips using "tfs_cleaned", clear

* Inspect county codes by treatment status
codebook homectyfips if home_hasnormalschool == 0
codebook homectyfips if home_hasnormalschool == 1

* Inspect institution codes (ACE recode) by treatment status
codebook acerecode if home_hasnormalschool == 0
codebook acerecode if home_hasnormalschool == 1

* Inspect IPEDS institution ID by treatment status
codebook unitid if home_hasnormalschool == 0
codebook unitid if home_hasnormalschool == 1

* Restrict to observations with non-missing unitid
codebook acerecode if home_hasnormalschool == 0 & unitid != .
codebook acerecode if home_hasnormalschool == 1 & unitid != .

* Summarize all loaded variables
summarize
